import request from '@/utils/request'

// 查询入库列表
export function listStoreIn(query) {
  return request({
    url: '/supplier/storeIn/list',
    method: 'get',
    params: query
  })
}

// 获取当前单号最大的值+1
export function generateNumber() {
  return request({
    url: '/supplier/businessNumber/generateStoreInNumber' ,
    method: 'get'
  })
}

// 查询入库详细
export function getStoreIn(id) {
  return request({
    url: '/supplier/storeIn/' + id,
    method: 'get'
  })
}

// 新增入库
export function addStoreIn(data) {
  return request({
    url: '/supplier/storeIn',
    method: 'post',
    data: data
  })
}

// 修改入库
export function updateStoreIn(data) {
  return request({
    url: '/supplier/storeIn',
    method: 'put',
    data: data
  })
}

// 删除入库
export function delStoreIn(id) {
  return request({
    url: '/supplier/storeIn/' + id,
    method: 'delete'
  })
}

// 导出入库
export function exportStoreIn(query) {
  return request({
    url: '/supplier/storeIn/export',
    method: 'get',
    params: query
  })
}